﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net.Mail;

namespace WebApplication10
{
    public partial class MasterFeedback : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            try
            {
                MailMessage mail = new MailMessage();
                
                mail.From = new MailAddress(Email.Text);
                mail.To.Add(new MailAddress("weewenjie@gmail.com"));
                mail.Subject = ("Feedback");
                mail.Body = Description.Text;
                SmtpClient smtp = new SmtpClient();
                smtp.Host = "smpt.gmail.com";
                smtp.Port = 587;
                smtp.EnableSsl = true;
                smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
                smtp.UseDefaultCredentials = false;
                smtp.Credentials = new System.Net.NetworkCredential("weewenjie@gmail.com", "90921067");

                smtp.Send(mail);




            }
            catch (Exception ex)
            { 
            
            }
        }
    }
}